{% extends "base.html" %}

{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">添加用户</h1>
    <a href="{{ url_for('auth.users') }}" class="btn btn-secondary">返回</a>
</div>

<div class="row">
    <div class="col-md-6">
        <form method="POST">
            {{ form.hidden_tag() }}
            <div class="mb-3">
                {{ form.username.label(class="form-label") }}
                {{ form.username(class="form-control") }}
            </div>
            <div class="mb-3">
                {{ form.password.label(class="form-label") }}
                {{ form.password(class="form-control") }}
            </div>
            <div class="mb-3">
                {{ form.role.label(class="form-label") }}
                {{ form.role(class="form-select") }}
            </div>
            <button type="submit" class="btn btn-primary">创建用户</button>
            <a href="{{ url_for('auth.users') }}" class="btn btn-secondary">取消</a>
        </form>
    </div>
</div>
{% endblock %}